package cn.hiapi.shopkeeper.entity.activity;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author AdinZ
 * @date 2023/2/3 1:16
 */
@Entity
@Table(name = "hiapi_shopkeeper_activity_vote_item")
@ApiModel(description = "报名选项奖品")
@Getter
@Setter
public class ActivityVoteItem extends BasicEntity {
    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;

    @ApiModelProperty("活动id")
    private long aid;
    @ApiModelProperty("店铺id")
    private long shopId;

    @ApiModelProperty("标题")
    private String title;
    @ApiModelProperty("图片")
    private String thumb;
    @ApiModelProperty("感谢语")
    private String body;
    @ApiModelProperty("选项id")
    private int otherId;

}
